<template>
  <div class="examine_main">
    <div class="examine_whole" v-for="(item,index) in examlist">
      <div class="list_ul">
        <ul>
          <li class="one_li">
            <div class="one_span">
              <span>请假人姓名：</span><span>{{item.name}}</span>
            </div>
            <p class="blue_color" @click="$router.push('/ExamineDetail/'+item.e_id)">查看具体详情</p>
          </li>
          <li><span>联系方式：</span><span class="blue_color">{{item.phone}}</span></li>
          <li><span>提交时间：</span><span>{{item.created_at*1000 | dateFmt('YYYY-MM-DD HH:mm:ss')}}</span></li>
          <li class="one_li">
            <div class="one_span">
              <span>请假类型：</span><span>{{item.type}}</span>
            </div>
            <p v-show="item.status===1" class="red_color">未审核</p>
            <p v-show="item.status===2" class="blue_color">已通过</p>
            <p v-show="item.status===3" class="blue_color">未通过</p>
          </li>
        </ul>
      </div>
      <div class="gray_line"></div>
    </div>
  </div>
</template>
<style lang="scss">
  .examine_main {
    padding-top: 50px;
    .examine_whole {
      width: 100%;
      .list_ul {
        padding: 10px;
        ul {
          li {
            width: 100%;
            font-size: 15px;
            padding: 10px 0;
            .blue_color {
              color: #0078de;
            }
          }
          .one_li {
            width: 100%;
            display: inline-flex;
            justify-content: space-between;
          }
        }
      }
      .gray_line {
        width: 100%;
        height: 5px;
        background: #f2f2f2;
      }
    }
  }
</style>
<script>
  import { getExamineList } from '../../api/supervise'

  export default {
    data () {
      return {
        examlist: [],
        status: ''
      }
    },
    created () {
      this._getExamineList()
    },
    methods: {
      _getExamineList () {
        this.noResult = false
        getExamineList().then(res => {
          // console.log(res)
          if (res.code === 200) {
            this.examlist = res.data.data
            this.status = res.data.status
            // console.log(this.examlist)
          }
        })
      }
    },
    components: {}
  }
</script>
